﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Whoot
{
    /// <summary>
    /// 发送注册事件
    /// </summary>
    public class EventData
    {
        public bool IsBreak = false;

        /// <summary>
        /// 时间名称或者ID
        /// </summary>
        public readonly string Name;

        public EventData(string name)
        {
            this.Name = name;
        }

        public void Break()
        {
            IsBreak = true;
        }
    }

    /// <inheritdoc />
    /// <summary>
    /// 泛型的事件类型
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class EventData<T> : EventData
    {
        public T Value;

        public EventData(string name, T v = default(T)) : base(name)
        {
            this.Value = v;
        }
    }
}